<template>
    <div><h1>房间管理</h1>
    姓名：<input type="text" v-model="param.name"><br>
    头像：<input type="file" @change="getFile($event)"><br>
    <input type="submit" value="提交" @click="formSubmit()">
    </div>
    
</template>

<script>
export default {
    data(){
        return{
            param:{}
        }
    },
    methods:{
        getFile(event){
            //得到文件表单的dom对象
            this.param.face=event.target.files[0];
            // this.event=event;
             event.preventDefault();
        },
       async formSubmit(){
            var info = await this.ajax.uploadSubmit(this.param,"/project/upload/add");
            alert(info);
        }
    }
}
</script>

<style>

</style>